home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / TURB_VIS / TVCC / TVCC.DOC < prev    next >
Text File  |  1992-12-29  |  4KB  |  104 lines

  1. TURBO VISION CUSTOM CONTROLS (TVCC)
  2. (c) Copyright 1992. Castle Computer Services.
  3.  
  4. Introduction
  5.  
  6. TVCC is a unit for Borland's TP/BP7.0 and Turbo Vision 2.0 (TV). It has 
  7. been designed to somewhat emulate the steel-grey styles of the Borland 
  8. Window's Custom Controls (BWCC). It is only useful on colour and VGA black 
  9. and white screens. Monochrome screens are handled in the normal TV fashion 
  10. with the default controls.
  11.  
  12. Using TVCC
  13.  
  14. TVCC has been designed to be has easy to use as possible, with only
  15. one control class inherited from the main TV class library, therefore,
  16. allowing minimal code change within existing systems. The extensions
  17. operate mainly from instances of TApplication (TTVCCApplication) and
  18. TDialog (TTVCCDialog).
  19.  
  20. In order to get the full effect from using TVCC, all controls should have 
  21. the ofFramed bit set in their options field prior to being inserted into the 
  22. dialog box.
  23.  
  24. TTVCCApplication.
  25.  
  26. Inherited from the TApplication class, TTVCCApplication adds an extra palette
  27. to the end of the normal application palettes defined by TV. Each Application that
  28. uses TVCC must be instances of this class.
  29.  
  30. Methods
  31.   Getpalette    Function GetPalette : PPalette; virtual;
  32.         Returns a pointer to the palette given by the index in the 
  33.         appPalette variable.
  34.  
  35.         TVCC defines extra palettes cTVCCappColor, cTVCCAppBlackWhite and
  36.         cTVCCappMonochrome.
  37.  
  38. TTVCCDialog.
  39.  
  40. Inherited from TDialog, each dialog that uses custom controls should be an 
  41. instance of this class.
  42.  
  43. With the exception of TButton (See below) all controls used inside dialog 
  44. boxes remain unaltered. To work correctly each control must have the ofFramed 
  45. bit in their Options field set. (See example)
  46.  
  47. Methods
  48.   Getpalette    Function GetPalette : PPalette; virtual;
  49.         Returns a pointer to the palette cTVCCDialog.
  50.  
  51.   Insert        Procedure Insert(P : PView);
  52.         Overrides TDialog's Insert procedure checking if the ofFramed 
  53.         bit is set in P. If it is, an instance of the class TFrameLine 
  54.         is created and inserted before P. The ofFramed bit of P is then 
  55.         reset before being inserted by a call to TDialog.Insert.
  56.  
  57. TTVCCButton.
  58.  
  59. The custom control button. This button provides the illusion of a raised 
  60. surface which moves down when pressed. It is inherited from TButton.
  61.  
  62. In normal TV applications the usual size for a TButton instance would be a 
  63. depth of 2. TTVCCButton instances are larger than their TV equivalents and 
  64. should have a depth of 3. On monochrome screens this extra length is reduced 
  65. to 2 to avoid screen corruption.
  66.  
  67. Methods
  68.   Draw          Procedure Draw; virtual;
  69.         Calls the method DrawNewState with Down as FALSE to Draw the 
  70.         view.
  71.  
  72.   DrawNewState  Procedure DrawNewState(Down : Boolean);
  73.         Equivalent of TButton's non virtual method DrawState. See TV 
  74.         documentation for further details. 
  75.  
  76.   HandleEvent   Procedure HandleEvent(var Event : TEvent); virtual;
  77.         Overrides TButton.HandleEvent calling DrawNewState to display 
  78.         the view according to its current state.
  79.  
  80. TFrameLine.
  81.  
  82. TFrameLine is an object giving the illusion of a dip in the screen around 
  83. controls. Inherited from TView it is automatically used by controls having 
  84. the ofFramed bit set in the Options field.
  85.  
  86. Methods
  87.   Draw          Procedure Draw; virtual;
  88.         Draws the frame around the control.
  89.  
  90.   GetPalette    Function GetPalette : PPalette; virtual;
  91.         Returns a pointer to the palette cTVCCFrameLine.
  92.  
  93.  
  94.  
  95. TStreamRec ID's
  96.  
  97. The TVCC library reserves the object type ID values 2000, 2001 and 2002. The
  98. procedure RegisterTVCC is provided to register the object types.
  99.  
  100.  
  101. All programs and documentation (c) Copyright 1992 Castle Computer Services.
  102. All rights reserved.
  103. All trademarks acknowledged.
  104.